using System;
using Microsoft.Practices.Unity;

namespace LegoBotPrimaAbstractions.Unity
{
    public interface IUnityExtender
    {
        IUnityContainer Container { get; set; }
        UnityContainerInfo ContainerInformation { get; set; }
        LifetimeManager Singleton { get; }
        void RegisterTypes(IUnityContainer container);
        void ApplyConfiguration();

        T Resolve<T>();
        T Resolve<T>(string name);
        T ResolveOrDefault<T>();
        T ResolveOrDefault<T>(string name);

        object EnsureTypeAndResolve(Type type);
        object EnsureTypeAndResolve(Type type, LifetimeManager lifetimeManager);

        object ResolveLastRegisteredConcrete(Type concreteType);
        object ResolveLastRegisteredAbstract(Type abstractType); 
    }
}